import requset from '@/utils/requset'

export const getcondition = (data) => requset({
  url: '/houses/condition',
  method: 'get',
  params: {
    id: data.id
  }
})
export const gethot = () => requset({
  url: '/area/hot'
})
export const gethouses = (params) => requset({
  method: 'get',
  url: `/houses?cityId=${params.id}&start=1&end=20`
})
export const getquyu = (params) => requset({
  method: 'get',
  url: `/houses?cityId=${params.id}&start=1&end=20`,
  params: {
    area: params.area,
    subway: params.subway,
    rentType: params.rentType,
    price: params.price,
    more: params.more
  }
})
export const pusthouse = (data) => requset({
  method: 'post',
  url: '/user/houses',
  data: {
    community: data.community,
    description: data.description,
    floor: data.floor,
    houseImg: data.houseImg,
    oriented: data.oriented,
    price: data.price,
    title: data.title,
    roomType: data.roomType,
    size: data.size,
    supporting: data.supporting,
    tempSlides: [data.tempSlides]
  }
})
export const getMap = (data) => requset({
  method: 'get',
  url: `/area/map?id=${data.id}`
})
export const Gethouse = (params) => requset({
  method: 'get',
  url: `/houses?cityId=${params.id}`
})
export const getgroups = (data) => requset({
  url: `/home/groups?area=${data.id}`
})
